package com.elastic.strategy;

import com.elastic.strategy.interfaces.Discount;

public class ChildrenDiscount implements Discount {



    @Override
    public Double calculate(Double price) {
        System.out.println("儿童票");
        if (price >= 20){
            return price - 10;
        }else {
            return price;
        }
    }
}
